﻿
''' <summary>
''' 直线轨迹线
''' </summary>
''' <remarks></remarks>
Public Class LineTrochoid
    Inherits TrochoidBase

#Region "variables"
    Private Const SPACE As Integer = 5
#End Region

#Region "properties"

#End Region


    Public Sub New(ByVal mainRect As Rectangle)
        MyBase.New(mainRect)
    End Sub

    Public Overrides Sub Init()

    End Sub

    Public Overrides Sub Show()
        Me.FormCollection.Sort()
        Dim _Count As Integer = Me.FormCollection.Count
        Dim _TotalWidth As Integer = SPACE + (Me.ItemSize.Width + SPACE) * _Count
        Dim _StartPosition As Point = Point.Empty
        With _StartPosition
            .X = Me.m_MainRect.Left - CInt((_TotalWidth - Me.m_MainRect.Width) / 2)
            .Y = Me.m_MainRect.Bottom + SPACE
        End With
        Dim _X As Integer = _StartPosition.X + SPACE
        Dim _Y As Integer = _StartPosition.Y

        For Each item As ImageForm In Me.FormCollection
            item.Show()
            item.UpdateLocation(_X, _Y)

            _X += item.ProgramInfo.FormImageSize.Width + SPACE
        Next

    End Sub

End Class
